package com.hyyt.shopjsp.util.procedure.dao;

import com.hyyt.shopjsp.util.dao.BaseMybatisDAO;
import com.hyyt.shopjsp.util.procedure.pojo.CallProcedure;
import org.springframework.stereotype.Repository;

import java.math.BigDecimal;
import java.util.Map;


/**
 * ICallProcedureDao 调用存储过Dao接口类
 * @author
 *
 */
@Repository
public class CallProcedureDao extends BaseMybatisDAO<CallProcedure, Integer> {

	/**
	 * 根据用户id查询 现金钱包 总余额
	 *
	 * @param paramMap 用户ID
	 * @return BigDecimall 类型的余额总数
	 */
	public BigDecimal getCustomerBalanceByCustomerId(Map<String, Object> paramMap){
		return (BigDecimal) getSqlSession().selectOne(sqlmapNamespace + "." + "getCustomerBalanceByCustomerId", paramMap);
	}

	/**
	 * 根据用户id查询 积分（金币） 总额
	 *
	 * @param paramMap
	 * @return BigDecimall 类型的积分（金币）总数
	 */
	public BigDecimal getBalanceCoinByCustomerId(Map<String, Object> paramMap){
		return (BigDecimal) getSqlSession().selectOne(sqlmapNamespace + "." + "getBalanceCoinByCustomerId", paramMap);
	}
	
}
